package com.niit.dao;


import com.niit.entity.Upvote;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.domain.Pageable;
import java.util.List;

/**
 * (Upvote)表数据库访问层
 *
 * @author kingner
 * @since 2024-05-28 19:46:45
 */
@Mapper
public interface UpvoteDao {

    /**
     * 通过ID查询单条数据

     * @return 实例对象
     */
    List<Upvote> queryByUid(int uid);

    Upvote queryOne (@Param("uid") int uid,@Param("gid") int gid);

    /**
     * 新增数据
     *
     * @param upvote 实例对象
     * @return 影响行数
     */
    int insert(Upvote upvote);

    int deleteOne(@Param("uid") int uid,@Param("gid") int gid);

    int deleteByGid(int gid);

}

